import request from './request';

export const getWeather = (data) => {
	request({
		url: "",
		method: "get",
		data
	})
}

//获取邮箱验证码
export const getMailCode = (data) => {
	return request({
		url: "/getMailCode",
		method: "post",
		data: data
	})
}

//获取邮箱验证码
export const register = (data) => {
	return request({
		url: "/register",
		method: "post",
		data
	})
}


//获取验证码
export const getCode = (data) => {
	return request({
		url: "/captchaImage",
		method: "get",
	})
}

//登陆
export const login = (data) => {
	return request({
		url: "/login",
		method: "POST",
		data
	})
}


//获取用户信息
export const getUserInfo = () => {
	return request({
		url: "/system/user/profile",
		method: "GET",
	})
}


//获取天气信息
export const toDoOption = (data) => {
	return request({
		url: "/System/toDoOption",
		method: "GET",
		data: {
			type: 1,
			...data
		}
	})
}